<div class="widget-content">
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'episode-form',
	'enableAjaxValidation'=>false,
	'htmlOptions'=>array('class'=>'form-horizontal', 'novalidate'=>'novalidate'),
)); ?>

	<?php if($form->errorSummary($model)):?>
			<div class="alert alert-block">
				<a class="close" data-dismiss="alert" href="#">&times;</a>
				<h4 class="alert-heading"><?php echo $form->errorSummary($model); ?></h4>
			</div>
	<?php endif;?>
	<fieldset>
	<div class="control-group">
		<?php echo $form->labelEx($model,'name',array('class'=>'control-label','for'=>'name')); ?>
		<div class="controls">
			<?php echo $form->textField($model,'name',array('size'=>60,'maxlength'=>200,'class'=>'input-large')); ?>
			<?php echo $form->error($model,'name'); ?>
			<?php echo $form->hiddenField($model,'eid'); ?>
			<?php echo $form->error($model,'eid'); ?>
		</div>
	</div>
	<div class="control-group">
		<?php echo $form->labelEx($model,'link',array('class'=>'control-label','for'=>'link')); ?>
		<div class="controls">
			<?php $this->widget('ext.kcfinder.EImageFinder',array('model'=>$model,'fieldName'=>'link','type'=>'files'));?>
			<?php echo $form->error($model,'link'); ?>
			<div id="ckeditor">
			</div>
		</div>
	</div>
	<div class="control-group">
		<?php echo $form->labelEx($model,'srt',array('class'=>'control-label','for'=>'srt')); ?>
		<div class="controls">
			<?php $this->widget('ext.kcfinder.EImageFinder',array('model'=>$model,'fieldName'=>'srt','type'=>'files'));?>
			<?php echo $form->error($model,'srt'); ?>
			<div id="ckeditor">
			</div>
		</div>
	</div>
	<div class="control-group">
		<?php echo $form->labelEx($model,'isdefault',array('class'=>'control-label','for'=>'isdefault')); ?>
		<div class="controls">
			<div class="btn-group" data-toggle="buttons-radio">
				<button onclick="document.getElementById('Episode_isdefault').value=1;return false;" class="btn btn-primary <?php if($model->isdefault!='0'){echo 'active';}?>">True</button>
				<button onclick="document.getElementById('Episode_isdefault').value=0;return false;" class="btn btn-primary <?php if($model->isdefault=='0'){echo 'active';}?>">False</button>
			</div>
			<?php echo $form->hiddenField($model,'isdefault'); ?>
			<?php echo $form->error($model,'isdefault'); ?>
		</div>
	</div>
	<div class="control-group">
		<?php echo $form->labelEx($model,'isdie',array('class'=>'control-label','for'=>'isdie')); ?>
		<div class="controls">
			<div class="btn-group" data-toggle="buttons-radio">
				<button onclick="document.getElementById('Episode_isdie').value=1;return false;" class="btn btn-primary <?php if($model->isdie!='0'){echo 'active';}?>">True</button>
				<button onclick="document.getElementById('Episode_isdie').value=0;return false;" class="btn btn-primary <?php if($model->isdie=='0'){echo 'active';}?>">False</button>
			</div>
			<?php echo $form->hiddenField($model,'isdie'); ?>
			<?php echo $form->error($model,'isdie'); ?>
		</div>
	</div>
	<div class="form-actions">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save',array('class'=>'btn btn-primary btn-large')); ?>
		<?php echo CHtml::link('Cancel',array('/episode/admin','eid'=>$server->id),array('class'=>'btn btn-large')); ?>
	</div>
	</fieldset>
<?php $this->endWidget(); ?>

</div><!-- form -->